The QuickTime VR Manager provides functions that you can use to manage object nodes.
You can use the QTVRGetCurrentMouseMode function to obtain the current mouse control modes.
The value returned by the QTVRGetCurrentMouseMode function is an unsigned long integer that encodes the current mouse control modes. If a bit in the integer is set, the corresponding mode is one of the current mouse modes. The mode bits are addressed using these constants:
enum {
kQTVRPanning = 1L << 0,
kQTVRTranslating = 1L << 1,
kQTVRZooming = 1L << 2,
kQTVRScrolling = 1L << 3,
kQTVRSelecting = 1L << 4
};
Notice that several modes can be returned. That means a return value could have both zooming and translating set, for example.
You can use the QTVRGetFrameRate function to get the current frame rate of an object node.
float QTVRGetFrameRate (QTVRInstance qtvr);
You can use the QTVRSetFrameRate function to set the frame rate of an object node.
OSErr QTVRSetFrameRate (QTVRInstance qtvr, float rate);
The QTVRSetFrameRate function sets the frame rate of the object node specified by the qtvr parameter to the rate specified by the rate parameter. This function is most useful when an object is being viewed with a looping animation. (The current view of the object may contain frames that are played in a loop, as specified by the file format.) You can use QTVRSetFrameRate to change the frame rate of the loop.
If the value specified in the rate parameter lies outside the valid range, QTVRSetFrameRate returns the result code constraintReachedErr and sets the frame rate to the nearest constraint.
Use QTVRGetFrameRate to get the frame rate of an object node.
You can use the QTVRGetViewRate function to get the current view rate of an object node.
float QTVRGetViewRate (QTVRInstance qtvr);
You can use the QTVRSetViewRate function to set the view rate of an object node.
OSErr QTVRSetViewRate (QTVRInstance qtvr, float rate);
The QTVRSetViewRate function sets the view rate of the object node specified by the qtvr parameter to the rate specified by the rate parameter. A node's view rate might be modified by the current animation settings.
If the value specified in the rate parameter lies outside the valid range, QTVRSetViewRate returns the result code constraintReachedErr and sets the view rate to the nearest constraint.
Use QTVRGetViewRate to get the current view rate of an object node.
You can use the QTVRGetCurrentViewDuration function to get the duration of the current view of an object node.
TimeValue QTVRGetCurrentViewDuration (QTVRInstance qtvr);
You can use the QTVRGetViewCurrentTime function to get the current time in the current view.
TimeValue QTVRGetViewCurrentTime (QTVRInstance qtvr);
The QTVRGetViewCurrentTime function returns, as its function result, the current time in the current view of the object node specified by the qtvr parameter. The returned value is always greater than or equal to 0 and less than or equal to the value returned by the QTVRGetCurrentViewDuration function.
You can use the QTVRSetViewCurrentTime function to set the time in the current view.
OSErr QTVRSetViewCurrentTime (QTVRInstance qtvr, TimeValue time);
The QTVRSetViewCurrentTime function sets the current time in the current view of the object node specified by the qtvr parameter to the value specified by the time parameter. That value should be greater than or equal to 0 and less than or equal to the value returned by the QTVRGetCurrentViewDuration function.
QTVRSetViewCurrentTime returns the result code timeNotInViewErr if the specified time value is greater than or equal to the view duration of the specified object node; in addition, QTVRSetViewCurrentTime sets the current view time to 1 less than the view duration. Similarly, QTVRSetViewCurrentTime returns the result code timeNotInViewErr if the specified time value is less than 0; in that case, QTVRSetViewCurrentTime sets the current view time to 0.
Use QTVRGetViewCurrentTime to get the current time of an object node.
You can use the QTVRGetViewStateCount function to get the number of view states of an object node.
UInt16 QTVRGetViewStateCount (QTVRInstance qtvr);
You can use the QTVRGetViewState function to get the value of a view state.
OSErr QTVRGetViewState (
QTVRInstance qtvr,
QTVRViewStateType viewStateType,
UInt16 *state);
You can use the QTVRSetViewState function to set the value of a view state.
OSErr QTVRSetViewState (
QTVRInstance qtvr,
QTVRViewStateType viewStateType,
UInt16 state);
The QTVRSetViewState function sets the value of the view state of the object node specified by the qtvr parameter that has the type specified by the viewStateType parameter to the value specified by the state parameter.
Use QTVRGetViewState to get the value of a view state.
You can use the QTVRGetAnimationSetting function to get the current state of an animation setting for an object node.
OSErr QTVRGetAnimationSetting (
QTVRInstance qtvr,
QTVRObjectAnimationSetting setting,
Boolean *enable);
The QTVRGetAnimationSetting function returns, through the enable parameter, the current state of the animation setting specified by the setting parameter for the object node specified by the qtvr parameter. If enable is true , the specified setting is currently enabled; otherwise, that setting is disabled.
You can use the QTVRSetAnimationSetting function to set the state of an animation setting for an object node.
OSErr QTVRSetAnimationSetting (
QTVRInstance qtvr,
QTVRObjectAnimationSetting setting,
Boolean enable);
The QTVRSetAnimationSetting function sets the state of the animation setting specified by the setting parameter for the object node specified by the qtvr parameter to the state specified by the enable parameter.
Use QTVRGetAnimationSetting to get the current state of an animation setting for an object node.
You can use the QTVRGetControlSetting function to get the current state of a control setting for an object node.
OSErr QTVRGetControlSetting (
QTVRInstance qtvr,
QTVRControlSetting setting,
Boolean *enable);
The QTVRGetControlSetting function returns, through the enable parameter, the current state of the control setting specified by the setting parameter for the object node specified by the qtvr parameter. If enable is true , the specified setting is currently enabled; otherwise, that setting is disabled.
You can use the QTVRSetControlSetting function to set the state of a control setting for an object node.
OSErr QTVRSetControlSetting (
QTVRInstance qtvr,
QTVRControlSetting setting,
Boolean enable);
The QTVRSetControlSetting function sets the state of the control setting specified by the setting parameter for the object node specified by the qtvr parameter to the state specified by the enable parameter.
Use QTVRGetControlSetting to get the current state of a control setting for an object node.
You can use the QTVRGetFrameAnimation function to get the current state of frame animation for an object node.
Boolean QTVRGetFrameAnimation (QTVRInstance qtvr);
You can use the QTVREnableFrameAnimation function to enable or disable frame animation for an object node.
OSErr QTVREnableFrameAnimation (QTVRInstance qtvr, Boolean enable);
The QTVREnableFrameAnimation function enables or disables the frame animation state for the object node specified by the qtvr parameter, according to the value of the enable parameter.
The current frame rate (as set by the function QTVRSetFrameRate ) is unaffected by the state of frame animation of an object node.
QTVREnableFrameAnimation is valid only for object nodes.
You should use QTVREnableFrameAnimation instead of standard QuickTime functions to control object animation.
Use QTVRGetFrameAnimation to get the current state of frame animation for an object node.
You can use the QTVRGetViewAnimation function to get the current state of view animation for an object node.
Boolean QTVRGetViewAnimation (QTVRInstance qtvr);
You can use the QTVREnableViewAnimation function to enable or disable view animation for an object node.
OSErr QTVREnableViewAnimation (QTVRInstance qtvr, Boolean enable);
The QTVREnableViewAnimation function enables or disables the view animation state for the object node specified by the qtvr parameter, according to the value of the enable parameter.
QTVREnableViewAnimation is valid only for object nodes.
You should use QTVREnableViewAnimation instead of standard QuickTime functions to control object animation.
Use QTVRGetViewAnimation to get the current state of view animation for an object node.
| Previous | Chapter Contents | Chapter Top | Next |